using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Gremlin.Graphics;
using Microsoft.Xna.Framework.Content;

namespace Squadron
{
    abstract class Gun : Mesh
    {
        protected uint damage;
        protected int firingCooldown;
        protected int coolDownTimer;

        protected String projectileMeshName;
        protected ContentManager contentManager;

        protected Gun(Microsoft.Xna.Framework.Game game, ContentManager content, string modelName)
            : base(game, content, modelName)
        {
        }

        abstract public Projectile Fire(Quaternion rotation);

        public override void Update(GameTime gameTime)
        {
            if (coolDownTimer > 0)
                coolDownTimer -= gameTime.ElapsedGameTime.Milliseconds;
            else
                coolDownTimer = 0;

            base.Update(gameTime);
        }

        public String ProjectileMeshName
        {
            set { projectileMeshName = value; }
        } 
    }
}
